package cn.com.tarotframework.server.oauth.controller;


import cn.com.tarotframework.server.oauth.dto.UserDto;
import cn.com.tarotframework.server.oauth.service.IUserService;
import cn.com.tarotframework.server.oauth.vo.UserSearchVo;
import cn.com.tarotframework.utils.response.TarotResponseResultBody;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import jakarta.validation.Valid;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;

import java.util.List;


/**
 * copyright (C), 2022, 塔罗牌基础架构
 *
 * @program tarot-authorization-server
 * @description 用户信息控制层
 * @author Jiang Xincan
 * @version 0.0.1
 * @create 2022/5/20 18:54
 **/
@Validated
@Tag(name = "用户信息管理", description = "用户信息管理模块")
@RestController
@RequestMapping("user")
@TarotResponseResultBody
public class UserController {

    @Qualifier("userService")
    private final IUserService userService;

    public UserController(IUserService userService) {
        this.userService = userService;
    }



    @Operation(summary = "查询用户列表", method = "GET", description = "查询所有用户信息")
    @GetMapping("list")
    public List<UserSearchVo> findUserList() {
        return userService.findAll();
    }

}
